/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entityBeans;

import java.io.Serializable;
import javax.persistence.*;

/**
 *
 * @author Deniels
 */
@Entity
public class Dvd implements Serializable {
    private static final long serialVersionUID = 1L;
   
    private Long id;
    private String codigo;
    private String nombre;
    private String actores;
    private String director;
    private String ano;
    private int precioVenta;
    private int precioArriendo;
    private java.util.Date timeCreated;
    private boolean estadoVenta;
    private boolean estadoArriendo;

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
        
    public boolean isEstadoVenta(){
        return estadoVenta;
    }
    public void setEstadoVenta(boolean ev){
        this.estadoVenta=ev;
    }
    public boolean isEstadoArriendo(){
        return estadoArriendo;
    }
    public void setEstadoArriendo(boolean ea){
        this.estadoArriendo=ea;
    }

    public String getCodigo( ) {
        return codigo;
    }
    public void setRut(String codigo) {
        this.codigo = codigo;
    }

    public String getNombre( ) {
        return nombre;
    }
    public void setUsername(String nombre) {
        this.nombre = nombre;
    }

    public String getActores( ) {
        return actores;
    }
    public void setActores(String actores) {
        this.actores = actores;
    }

    public String getDirector( ) {
        return director;
    }
    public void setDirector(String director) {
        this.director = director;
    }

    public String getAno( ) {
        return ano;
    }
    public void setDireccion(String ano) {
        this.ano = ano;
    }

    public int getPrecioVenta( ) {
        return precioVenta;
    }
    public void setTelefono(int precioVenta) {
        this.precioVenta = precioVenta;
    }

    public int getPrecioArriendo( ) {
        return precioArriendo;
    }
    public void setPrecioArriendo(int precioArriendo) {
        this.precioArriendo = precioArriendo;
    }

    @Temporal(TemporalType.TIME)
    public java.util.Date getTimeCreated( ) {
    	return timeCreated;
    }
    public void setTimeCreated(java.util.Date time) {
    	timeCreated = time;
    }


    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Dvd)) {
            return false;
        }
        Dvd other = (Dvd) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityBeans.Dvd[id=" + id + "]";
    }

}
